#ifndef __TCPSERVER_H__
#define __TCPSERVER_H__

#include "acceptor.h"
#include "eventLoop.h"

class TcpServer
{
public:
	TcpServer(const string & ip,unsigned short port);

	~TcpServer();

	void start();

	void stop();

	void setAllCallBack(function<void(const shared_ptr<TcpConnection> & con)> && callBack1,
						function<void(const shared_ptr<TcpConnection> & con)> && callBack2,
						function<void(const shared_ptr<TcpConnection> & con)> && callBack3
						);

private:
	Acceptor _acceptor;
	EventLoop _loop;
};




#endif
